#include <stdio.h>

int main()
{
    int i = 1;
    double e = 1, last_e, f = 1.0;
    do
    {
        last_e = e;
        f = f / i;
        i++;
        e += f;
    } while ((e - last_e) >= 1e-15);
    printf("%.14f\n", e);
    return 0;
}
